<div class="page company">
    <div class="action-bar">
        <div class="row">
            <div class="col-sm-8">
                <form>
                    <div class="row">
                        <div class="col-sm-4">
                            <input type="text" class="form-control"
                                   placeholder="请输入查询条件"
                                   ng-model="search"/>
                        </div>
                        <div class="col-sm-4">
                            <button class="btn btn-primary" ng-click="searchUser()">
                                查询
                            </button>
                        </div>
                    </div>
                </form>
            </div>
            <!--<div class="col-sm-4">
                <button class="btn btn-success pull-right" ng-click="addUser()" btn-auth="user.post">
                    增加用户
                </button>
            </div>-->
        </div>
    </div>
</div>

<div class="panel page-content">
    <div ng-if="users.length<=0" class="nodata"></div>
    <table class="table table-hover" ng-if="users.length>0">
        <thead>
        <tr>
            <th>用户名</th>
            <th>真实姓名</th>
            <th>积分</th>
            <th>昵称</th>
            <th>生日</th>
            <th>手机号</th>
            <th>头像</th>
            <!--<th style="text-align: center">邮箱</th>-->
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="t in users">
            <td>{{t.userName}}</td>
            <td>{{t.name}}</td>
            <td>{{t.score}}</td>
            <td>
                {{t.wxNickname}}
            </td>
            <td>{{t.birthday | date:"yyyy-MM-dd"}}</td>
            <td>{{t.phone}}</td>
            <td>
                <img style="width: 50px;height: 50px;" src="{{t.wxHeadimgurl||'img/default-avatar.png'}}" />
            </td>
            <!-- <td class="text-center">
                 {{t.email}}
             </td>-->
            <td >
                <button class="btn btn-success btn-md mr10" ng-click="scoreRecord(t)" >积分记录</button>
                <button class="btn btn-warning btn-md mr10" ng-click="orderRecord(t)" >消费记录</button>
                <button ng-if="user.id == 2 " class="btn btn-danger btn-md mr10" ng-click="removeRecord(t)" >清空记录</button>
            </td>
        </tr>
        </tbody>
    </table>

    <div class="text-center">
        <pagination total-items="pager.totalItems" ng-model="pager.pageNo"
                    items-per-page="pager.pageSize" ng-change="searchUser()"
                    previous-text="上一页" next-text="下一页" max-size="3"></pagination>
    </div>
</div>




